//
//  LExerciseVC.m
//  LXing
//
//  Created by L on 2017/5/10.
//  Copyright © 2017年 L. All rights reserved.
//

#import "LExerciseVC.h"
#import "LStartVC.h"
#import <Masonry.h>

@interface LExerciseVC ()

@property (nonatomic, strong) UIButton *exerciseButton;

@end

@implementation LExerciseVC

- (void)viewDidLoad {
    [super viewDidLoad];
    
    self.view.backgroundColor = [UIColor whiteColor];
    [self setupUI];
}

- (void)setupUI
{
    _exerciseButton = [[UIButton alloc] init];
    [_exerciseButton setBackgroundImage:[UIImage imageNamed:@"btn_start_normal_118x118_"] forState:UIControlStateNormal];
    [_exerciseButton setTitle:@"开始" forState:UIControlStateNormal];
    [_exerciseButton setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
    _exerciseButton.titleLabel.font = [UIFont systemFontOfSize:20];
    [_exerciseButton sizeToFit];
    [self.view addSubview:_exerciseButton];
    [_exerciseButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerX.equalTo(self.view);
        make.bottom.equalTo(self.view).offset(-20);
    }];
    [_exerciseButton addTarget:self action:@selector(start) forControlEvents:UIControlEventTouchUpInside];
}

- (void)start
{
    LStartVC *vc = [[LStartVC alloc] init];
    [self presentViewController:vc animated:YES completion:nil];
}

@end
